package cn.bqjr.platform.config;

public enum DataSourceType {
	 write1("writeOneDataSource"),  
	 write2("writeTwoDataSource"), 
	 read1("readOneDataSource"),  
	 read2("readTwoDataSource");
	  
	 private String type;  
  
	 private DataSourceType(String type) {  
	        this.type = type;  

	    } 
	   
	    /** 
	     * @return the code 
	     */  
	 public String getType() {  
	        return type;  
	    }  
	  


/*    MASTER("master", "master db"),  
  
    SLAVE("slave", "slave db"),  
  
    ARCHIVE("archive", "archive db");  
  
    private String code;  
  
    private String desc;  
  
    private DataSourceType(String code, String desc) {  
        this.code = code;  
        this.desc = desc;  
    } 
   
    public static DataSourceType getEnumByCode(String code) {  
        if (StringUtils.isBlank(code)) {  
            return null;  
        }  
  
        for (DataSourceType ele : values()) {  
            if (StringUtils.equals(code, ele.getCode())) {  
                return ele;  
            }  
        }  
  
        return null;  
    }  
  
    public String getCode() {  
        return code;  
    }  
  
    public String getDesc() {  
        return desc;  
    } */ 
  
}  
